<template>
  <div class='container'>
  <!-- 预览文章对话框 -->
  <el-dialog
  title="预览文章"
  :visible="showarticle"
  width="60%"
  @close='cancle'
  >
<h2>{{articledetail.title}}</h2>
<div class="box">
  <span>{{articledetail.createTime | parseTimeByString}}</span>&nbsp; <span>超级管理员</span>   <span><i class="el-icon-view"></i>{{articledetail.visits}}</span>
</div>
<!-- <el-card>
  123
</el-card> -->
<div class="box2">
  <p v-html="articledetail.articleBody"></p>
</div>
</el-dialog>

  </div>
</template>

<script>
export default {
  data() {
    return {
    }
  },
  props: {
    showarticle: {
      type:Boolean,
      default:false
    },
    articledetail: {
       type:[Object,String],
       required: true
    },
  },
  components: {
  },
  methods: {
  cancle() {
    this.$emit('cancle')
  }
  }
}
</script>

<style scoped >
.box {
  height: 28px;
}
.box2 {
background-color:#f5f5f5;
  border-top: 1px dashed #cccccc;
}
</style>
